// arrow function callback
foo(a => a); // OK

// generator as callback
foo(function*() { yield; }); // OK

// function expression not used as callback or function argument
const foo = function foo(a) { return a; }; // OK

// unbound function expression callback
foo(function() { return this.a; }); // OK

// recursive named function callback
foo(function bar(n) { return n && n + bar(n - 1); }); // OK

foo(function() { (() => this); });
foo(function() { this; }.bind(obj));
foo(function() { this; }.call(this));
foo(a => a);
foo(function*() {});
foo(function() { this; });